package com.xbongbong.paas.lowcode;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.UserVO;
import com.xbongbong.pro.developer.pojo.dto.DeveloperAddDTO;
import com.xbongbong.pro.developer.pojo.dto.DeveloperDeleteDTO;
import com.xbongbong.pro.developer.pojo.dto.DeveloperGetDTO;
import com.xbongbong.pro.developer.pojo.dto.DeveloperListDTO;
import com.xbongbong.pro.developer.pojo.dto.DeveloperUpdateDTO;
import com.xbongbong.pro.developer.pojo.dto.DeveloperVerifyDTO;
import com.xbongbong.pro.developer.pojo.vo.DeveloperAddVO;
import com.xbongbong.pro.developer.pojo.vo.DeveloperDeleteVO;
import com.xbongbong.pro.developer.pojo.vo.DeveloperGetVO;
import com.xbongbong.pro.developer.pojo.vo.DeveloperListVO;
import com.xbongbong.pro.developer.pojo.vo.DeveloperUpdateVO;

import java.util.List;

/**
 * @author 吴峰
 * @date 2021/03/03 16:46
 */
public interface DeveloperService {

    /**
     * 列表
     * @param developerListDTO
     * @return com.xbongbong.pro.developer.pojo.vo.DeveloperListVO
     * @author 吴峰
     * @date 2021/3/3 19:34
     * @throws XbbException
     */
    DeveloperListVO list(DeveloperListDTO developerListDTO) throws XbbException;

    /**
     * 插入
     * @param developerAddDTO
     * @return com.xbongbong.pro.developer.pojo.vo.DeveloperAddVO
     * @author 吴峰
     * @date 2021/3/3 19:34
     * @throws XbbException
     */
    DeveloperAddVO add(DeveloperAddDTO developerAddDTO) throws XbbException;

    /**
     * 更新
     * @param developerUpdateDTO
     * @return com.xbongbong.pro.developer.pojo.vo.DeveloperUpdateVO
     * @author 吴峰
     * @date 2021/3/3 19:34
     * @throws XbbException
     */
    DeveloperUpdateVO update(DeveloperUpdateDTO developerUpdateDTO) throws XbbException;

    /**
     * delete
     * @param developerDeleteDTO
     * @return com.xbongbong.pro.developer.pojo.vo.DeveloperUpdateVO
     * @author 吴峰
     * @date 2021/3/3 19:34
     * @throws XbbException
     */
    DeveloperDeleteVO delete(DeveloperDeleteDTO developerDeleteDTO) throws XbbException;
    /**
     * get
     * @param developerGetDTO
     * @return com.xbongbong.pro.developer.pojo.vo.DeveloperGetVO
     * @author 吴峰
     * @date 2021/3/3 19:34
     * @throws XbbException
     */
    DeveloperGetVO get(DeveloperGetDTO developerGetDTO) throws XbbException;
    /**
     * 校验开发者权限
     * @param corpid
     * @param formId
     * @param userVO
     * @param saasMark
     * @param businessType
     * @return void
     * @author 吴峰
     * @date 2021/3/9 9:23
     * @throws XbbException
     */
    void verifyPermission(String corpid, Long formId, UserVO userVO, Integer saasMark, Integer businessType) throws XbbException;
    /**
     * 校验该用户对于该表单是否有开发者权限
     * @param developerVerifyDTO
     * @return boolean false：该用户对于该表单无开发者权限 true：该用户对于该表单有开发者权限
     * @author 吴峰
     * @date 2021/3/9 9:25
     * @throws XbbException
     */
    boolean hasDeveloperPermission(DeveloperVerifyDTO developerVerifyDTO) throws XbbException;
}
